﻿Imports DTO
Imports DAO

Public Class SachBUS


    Public Function LuuFileExcelVaoCSDL(ByVal table As DataTable) As Integer
        Dim dao As New SachDAO()
        Return dao.LuuFileExcelVaoCSDL(table)
    End Function

    Public Function DocFileExcel(ByVal sql As String, ByVal path As String) As DataSet
        Dim dao As New SachDAO()
        Return dao.DocFileExcel(sql, path)
    End Function

    Public Function LayDSSachTable() As DataTable
        Dim dao As New SachDAO()
        Return dao.LayDSSachTable()
    End Function

    Public Function LayThongTinSachTheoMaSach(ByVal maSach As Integer) As SachDTO
        Dim dao As New SachDAO()
        Return dao.LayThongTinSachTheoMaSach(maSach)
    End Function

    Public Function CapNhatSach(ByVal sql As String) As Integer
        Dim dao As New SachDAO()
        Return dao.CapNhatSach(sql)
    End Function


    Public Function LayDSSach() As List(Of SachDTO)
        Dim dao As New SachDAO()
        Return dao.LayDSSach()
    End Function


    Public Function TimKiem(ByVal hsCrt As SachCRT) As DataTable
        Dim dao As New SachDAO()
        Return dao.TimKiem(hsCrt)
    End Function

    Public Function ThemSach(ByVal sql As String) As Integer
        Dim dao As New SachDAO()
        Return dao.ThemSach(sql)
    End Function
End Class
